/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.Production.impl;

import EA_Model.IEC61970.Core.impl.PowerSystemResourceImpl;

import EA_Model.IEC61970.Domain.ActivePower;

import EA_Model.IEC61970.Generation.Production.HydroPump;
import EA_Model.IEC61970.Generation.Production.ProductionPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Hydro Pump</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HydroPumpImpl#getPumpDischAtMaxHead <em>Pump Disch At Max Head</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HydroPumpImpl#getPumpDischAtMinHead <em>Pump Disch At Min Head</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HydroPumpImpl#getPumpPowerAtMaxHead <em>Pump Power At Max Head</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.HydroPumpImpl#getPumpPowerAtMinHead <em>Pump Power At Min Head</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class HydroPumpImpl extends PowerSystemResourceImpl implements HydroPump {
	/**
	 * The cached value of the '{@link #getPumpDischAtMaxHead() <em>Pump Disch At Max Head</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPumpDischAtMaxHead()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Float pumpDischAtMaxHead;

	/**
	 * The cached value of the '{@link #getPumpDischAtMinHead() <em>Pump Disch At Min Head</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPumpDischAtMinHead()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Float pumpDischAtMinHead;

	/**
	 * The cached value of the '{@link #getPumpPowerAtMaxHead() <em>Pump Power At Max Head</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPumpPowerAtMaxHead()
	 * @generated
	 * @ordered
	 */
	protected ActivePower pumpPowerAtMaxHead;

	/**
	 * The cached value of the '{@link #getPumpPowerAtMinHead() <em>Pump Power At Min Head</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPumpPowerAtMinHead()
	 * @generated
	 * @ordered
	 */
	protected ActivePower pumpPowerAtMinHead;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected HydroPumpImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ProductionPackage.Literals.HYDRO_PUMP;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float getPumpDischAtMaxHead() {
		if (pumpDischAtMaxHead != null && pumpDischAtMaxHead.eIsProxy()) {
			InternalEObject oldPumpDischAtMaxHead = (InternalEObject)pumpDischAtMaxHead;
			pumpDischAtMaxHead = (EA_Model.IEC61970.Domain.Float)eResolveProxy(oldPumpDischAtMaxHead);
			if (pumpDischAtMaxHead != oldPumpDischAtMaxHead) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD, oldPumpDischAtMaxHead, pumpDischAtMaxHead));
			}
		}
		return pumpDischAtMaxHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float basicGetPumpDischAtMaxHead() {
		return pumpDischAtMaxHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPumpDischAtMaxHead(EA_Model.IEC61970.Domain.Float newPumpDischAtMaxHead) {
		EA_Model.IEC61970.Domain.Float oldPumpDischAtMaxHead = pumpDischAtMaxHead;
		pumpDischAtMaxHead = newPumpDischAtMaxHead;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD, oldPumpDischAtMaxHead, pumpDischAtMaxHead));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float getPumpDischAtMinHead() {
		if (pumpDischAtMinHead != null && pumpDischAtMinHead.eIsProxy()) {
			InternalEObject oldPumpDischAtMinHead = (InternalEObject)pumpDischAtMinHead;
			pumpDischAtMinHead = (EA_Model.IEC61970.Domain.Float)eResolveProxy(oldPumpDischAtMinHead);
			if (pumpDischAtMinHead != oldPumpDischAtMinHead) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD, oldPumpDischAtMinHead, pumpDischAtMinHead));
			}
		}
		return pumpDischAtMinHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float basicGetPumpDischAtMinHead() {
		return pumpDischAtMinHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPumpDischAtMinHead(EA_Model.IEC61970.Domain.Float newPumpDischAtMinHead) {
		EA_Model.IEC61970.Domain.Float oldPumpDischAtMinHead = pumpDischAtMinHead;
		pumpDischAtMinHead = newPumpDischAtMinHead;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD, oldPumpDischAtMinHead, pumpDischAtMinHead));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower getPumpPowerAtMaxHead() {
		if (pumpPowerAtMaxHead != null && pumpPowerAtMaxHead.eIsProxy()) {
			InternalEObject oldPumpPowerAtMaxHead = (InternalEObject)pumpPowerAtMaxHead;
			pumpPowerAtMaxHead = (ActivePower)eResolveProxy(oldPumpPowerAtMaxHead);
			if (pumpPowerAtMaxHead != oldPumpPowerAtMaxHead) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD, oldPumpPowerAtMaxHead, pumpPowerAtMaxHead));
			}
		}
		return pumpPowerAtMaxHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower basicGetPumpPowerAtMaxHead() {
		return pumpPowerAtMaxHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPumpPowerAtMaxHead(ActivePower newPumpPowerAtMaxHead) {
		ActivePower oldPumpPowerAtMaxHead = pumpPowerAtMaxHead;
		pumpPowerAtMaxHead = newPumpPowerAtMaxHead;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD, oldPumpPowerAtMaxHead, pumpPowerAtMaxHead));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower getPumpPowerAtMinHead() {
		if (pumpPowerAtMinHead != null && pumpPowerAtMinHead.eIsProxy()) {
			InternalEObject oldPumpPowerAtMinHead = (InternalEObject)pumpPowerAtMinHead;
			pumpPowerAtMinHead = (ActivePower)eResolveProxy(oldPumpPowerAtMinHead);
			if (pumpPowerAtMinHead != oldPumpPowerAtMinHead) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD, oldPumpPowerAtMinHead, pumpPowerAtMinHead));
			}
		}
		return pumpPowerAtMinHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower basicGetPumpPowerAtMinHead() {
		return pumpPowerAtMinHead;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPumpPowerAtMinHead(ActivePower newPumpPowerAtMinHead) {
		ActivePower oldPumpPowerAtMinHead = pumpPowerAtMinHead;
		pumpPowerAtMinHead = newPumpPowerAtMinHead;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD, oldPumpPowerAtMinHead, pumpPowerAtMinHead));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD:
				if (resolve) return getPumpDischAtMaxHead();
				return basicGetPumpDischAtMaxHead();
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD:
				if (resolve) return getPumpDischAtMinHead();
				return basicGetPumpDischAtMinHead();
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD:
				if (resolve) return getPumpPowerAtMaxHead();
				return basicGetPumpPowerAtMaxHead();
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD:
				if (resolve) return getPumpPowerAtMinHead();
				return basicGetPumpPowerAtMinHead();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD:
				setPumpDischAtMaxHead((EA_Model.IEC61970.Domain.Float)newValue);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD:
				setPumpDischAtMinHead((EA_Model.IEC61970.Domain.Float)newValue);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD:
				setPumpPowerAtMaxHead((ActivePower)newValue);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD:
				setPumpPowerAtMinHead((ActivePower)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD:
				setPumpDischAtMaxHead((EA_Model.IEC61970.Domain.Float)null);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD:
				setPumpDischAtMinHead((EA_Model.IEC61970.Domain.Float)null);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD:
				setPumpPowerAtMaxHead((ActivePower)null);
				return;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD:
				setPumpPowerAtMinHead((ActivePower)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MAX_HEAD:
				return pumpDischAtMaxHead != null;
			case ProductionPackage.HYDRO_PUMP__PUMP_DISCH_AT_MIN_HEAD:
				return pumpDischAtMinHead != null;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MAX_HEAD:
				return pumpPowerAtMaxHead != null;
			case ProductionPackage.HYDRO_PUMP__PUMP_POWER_AT_MIN_HEAD:
				return pumpPowerAtMinHead != null;
		}
		return super.eIsSet(featureID);
	}

} //HydroPumpImpl
